<template>
  <span @click="handleClick">飞行</span>
</template>

<script setup>
import { toRefs } from 'vue'
import { useMapStore } from '@/stores/map' // 使用pinia
const { map } = toRefs(useMapStore())

function handleClick() {
  map.value.getView().animate({
    center: [112, 32],
    zoom: 5,
    duration: 666,
  })
}
</script>
